<script setup>
import { ref } from 'vue';
import { PictureOutlined } from '@ant-design/icons-vue';
// import Uploader from 'simple-uploader.js';

const props = defineProps(['fileList', 'action']);
const fileList = ref(R.clone(props.fileList));

function handleChange(...args) {}
function handleDrop(...args) {}

// const uploader = new Uploader();
// uploader.on('fileAdded', (file, event) => file.ignore);
// uploader.on('filesAdded', (files, fileList, event) => {
// });
</script>

<template>
  <a-upload-dragger
    v-model:fileList="fileList"
    multiple
    :action="props.action"
    :beforeUpload="props.beforeUpload"
    @change="handleChange"
    @drop="handleDrop">
    <picture-outlined style="font-size: 2em; color: rgba(0,0,0,.45)" />
    <p class="ant-upload-text">将图片拖到此处或点击选择，按住Ctrl可同时多选，单次最多可选100张</p>
    <p class="ant-upload-hint">仅支持上传 jpg / jpeg / png / gif 格式文件</p>
  </a-upload-dragger>
</template>
